import {Component} from 'react';
import WithRoute from '../router/withRoute';
class Login extends Component{
    render(){
        return(
            <div>
               <h1>登录页面</h1> 
               <button onClick={()=>{
                localStorage.setItem("token","2131231")
                let [searchParams]  = this.props.router.search;
                let oldUrl =  searchParams.get("redirctUrl")
                console.log(oldUrl)
                this.props.router.navigate(oldUrl)
               }}>登录</button>
            </div>
        )
    }
}
export default WithRoute(Login);